package com.siants.girl.controller;

import com.siants.girl.properties.GirlProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 〈一句话功能简述〉<br>
 * 〈〉
 *
 * @author yanxin
 * @create 2018/12/4
 * @since 1.0.0
 */
@RestController
@RequestMapping(value = "/hello")
public class HelloController {

    /*@Value("${cupSize}")
    private String cupSize;

    @Value("${age}")
    private String age;

    @Value("${content}")
    private String content;*/

    @Autowired
    private GirlProperties girlProperties;

    //@RequestMapping(value = {"/hello", "/hi"}, method = RequestMethod.GET)
    @RequestMapping(value = "/say/{id}", method = RequestMethod.GET)
    //public String say(@PathVariable("id") Integer id){
    public String say(@RequestParam(value = "id", required = false, defaultValue = "0") Integer id){
        //return "Hello Spring Boot!";
        //return girlProperties.getCupSize();
        return "id: "+id;
    }
}
